<!DOCTYPE HTML />
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>会员活动</title>
    <?php include_once("common/common_js.php") ?>
</head>
<body>
<?php include_once("common/banner.php"); ?>
<div class="warpper">
    <?php include_once("common/header.php"); ?>
    <div>

        <div class="al">
            <div>
                <h3>
                    活动列表
                </h3>
                <ul class="content">
                    <?php foreach ($view['pagination']['data'] as $value) { ?>
                    <li style="display: block;height: 220px; margin-top: 10px;">
                        <div style="width:200px;float: left">
                            <a href="/index.php/activities/show/<?php echo $value['activityId'];?>"><img
                                    src='<?php echo $value['picture'];?>' width="200px;" height="200px"/></a>
                        </div>
                        <div style="float:left; margin-left: 20px; width: 500px;">
                            <h4>
                                <a href="/index.php/activities/show/<?php echo $value['activityId'];?>"><?php echo $value['title'];?></a>(票数：<?php echo $value['amount'] == ''
                                    ? 0 : $value['amount'];?>)
                            </h4>

                            <div style="height: 150px; overflow: hidden">
                                <?php echo strip_tags($value['description']);?>
                            </div>
                            <span><a href='javascript:vote(<?php echo $value['activityId'];?>)'><img src='/images/vo.png'/></a>

                                <!--<input type="radio" onclick="vote('hao',<?php /*echo $value['activityId']; */?>)"
                                         name="voteOption" value="hao">好<input
                                    onclick="vote('zhong',<?php /*echo $value['activityId']; */?>)" type="radio"
                                    name="voteOption"
                                    value="zhong">中<input onclick="vote('cha',<?php /*echo $value['activityId']; */?>)"
                                                          type="radio"
                                                          name="voteOption"
                                                          value="cha">差--></span>
                        </div>

                        <!--   <div>我的评论</div>-->
                    </li>
                    <?php } ?>
                </ul>

            </div>
        </div>


    </div>
        <?php include("common/footer.php"); ?>
</div>
<script language="javascript">
    function vote(voteId) {
        $.get("/index.php/ajax/voteActivity", {"activityId":voteId}, function(data) {
            alert(data);
            return false;
        })
    }

</script>
</body>
</html>